<?php if(!defined('HDPHP_PATH'))exit;C('SHOW_NOTICE',FALSE);?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>购物车页</title>
  <link rel="stylesheet" type="text/css" href="http://127.0.0.1/my/wasai/Static/hdjs/hdjs.css">
  <link rel="stylesheet" type="text/css" href="http://127.0.0.1/my/wasai/Static/hdjs/hdjs.min.js">
  <script type="text/javascript" src="http://127.0.0.1/my/wasai/Static/Js/jquery-1.7.2.min.js"></script>
  <script src="http://127.0.0.1/my/wasai/Static/hdjs/hdjs.min.js" type="text/javascript" charset="utf-8"></script>
  <script src="http://127.0.0.1/my/wasai/Static/public/js/index.js" type="text/javascript" charset="utf-8"></script>
  <link rel="stylesheet" type="text/css" href="http://127.0.0.1/my/wasai/Static/public/shop.css">
  <link rel="stylesheet" type="text/css" href="http://127.0.0.1/my/wasai/Static/public/index.css">
  <script type="text/javascript">
  	$(function(){
  		$('.delshop').click(function(){
  			var sid=$(this).attr('sid');
  			$.ajax({
  				type:"post",
  				url:"<?php echo U('Index/Shop/delshop');?>",
  				data:{sid:sid},
  				dataType:'json',
  				success:function(phpDaata){
  					
  				}
  			});
  		})
  		$('.bigdel').click(function(){
  			var data=$('form').serialize();
  			$.ajax({
  				type:"post",
  				url:"<?php echo U('Index/Shop/delshop');?>",
  				data:data,
  				success:function(phpDaata){
  					
  				}
  			});
  		})
  		$('.chauid').click(function(){
  			$.ajax({
  				type:"post",
  				url:"<?php echo U('Index/Shop/chaxun');?>",
  				success:function(phpDaata){
  					var da=phpDaata;
  					if(da==0){
  						alert('请先登陆.亲!');
  						location.href="<?php echo U('Index/Login/denglu');?>";
  					}else if(da==1){
  						location.href="<?php echo U('Index/Shoplist/index');?>";
  					}
  				}
  			});
  		})
  	})
  </script>
</head>

<body>
   <?php if(!defined('HDPHP_PATH'))exit;C('SHOW_NOTICE',FALSE);?>
<!--顶部开始-->
    <div class="top">
    	<div class="top1">
    	   <div class="top3">
    	   	<?php if(isset($_SESSION['uid']) || isset($_SESSION['nicname'])){ ?>
    	   	 <ul class="denglu one">
    			<li class="li1" style="width: 8px;">
    				<a href="<?php echo U('Index/Geren/index');?>"><img src="http://127.0.0.1/my/wasai/<?php echo $_SESSION['hearimg'];?>" alt="" style="width: 30px;height: 30px;position: relative;left: -8px;top: 7px;"/></a>
    			</li>
    			<li class="li2"><span><?php echo $_SESSION['nicname'];?></span>&nbsp;&nbsp;&nbsp;<a href="<?php echo U('Index/Login/out');?>">退出</a></li>
    		  </ul>
    	   	 <?php }else{ ?>
    		 <ul class="denglu">
    			<li class="li1"><a href="<?php echo U('Index/Login/denglu');?>">登陆</a></li>
    			<li class="li2"><a href="<?php echo U('Index/Login/index');?>">注册</a></li>
    		 </ul>
    		 <?php } ?>
    		 <ul class="gowu">
    		 	<li class="li2"><a href="<?php echo U('Index/Shop/index');?>" >购物车<span class="zongshuliang">    <?php if($_SESSION[cart][total_rows]){ ?><?php echo $_SESSION[cart][total_rows];?><?php }else{ ?>0<?php } ?></span> 件</a></li>
    			<li class="li1"><img src="http://127.0.0.1/my/wasai/Static/public/images/logo.png" alt="" /></li>
    			
    		 </ul>
    	   </div>
    	</div>
    	<div class="top2">
    		<div class="top4">
    			<a class="wosai" href=""><img src="" alt="" /></a>
	    	   	 <ul class="caidan">
	    			<li class="li1"><a href="<?php echo U('Index/Index/index');?>"></a></li>
	    			<li class="li2"><a href="<?php echo U('Index/Daohang/index');?>">市集</a></li>
	    			<li class="li2"><a href="<?php echo U('Index/List/index',array('cid'=>23));?>">服装</a></li>
	    			<li class="li2"><a href="<?php echo U('Index/List/index',array('cid'=>112));?>">饰品</a></li>
	    			<li class="li2"><a href="<?php echo U('Index/List/index',array('cid'=>124));?>">鞋包</a></li>
	    			<li class="li3"><a href="<?php echo U('Index/List/index',array('cid'=>137));?>">居家</a></li>
	    			<li class="li4"><a href="<?php echo U('Index/Index/index');?>"><img src="http://127.0.0.1/my/wasai/Static/public/images/wosai.png" alt="" /></a></li>
	    		 </ul>
	    		 <ul class="sousuo">
	    			<li class="li1">
	    				<form action="" method="post">
	    					<input class="sou" type="" placeholder="请输入要搜索的关键词" name="" value="" />
	    					<input class="tijiao" type="submit" value=""/>
	    				</form>
	    			</li>
	    			<li class="li2"><a href="<?php echo U('Index/List/index',array('cid'=>151));?>">数码</a></li>
	    			<li class="li3"><a href="<?php echo U('Index/List/index',array('cid'=>163));?>">文具</a></li>
	    		</ul>
    	   </div>
    	</div>
    </div>
    <!--顶部结束-->

    
    <!--购物车开始-->
    <div class="shopcat">
    	<div class="shop_box">
    		<img src="http://127.0.0.1/my/wasai/Static/public/images/shop1.jpg"/>
    		<div class="gouwuche">
    			<ul>
    				<li class="li1"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><a href="<?php echo U('Index/Daohang/index');?>">继续购物</a></li>
    				<li class="li2"><a href="">购物车状态</a><span>(<?php echo $zong['total_rows'];?>/99)</span></li>
    			</ul>
    		</div>
    		
    		<ul class="shop_one">
    			<li class="li1">
    				<a href="javascript:hd_select_all('.ca_gou')" class="ca_quanxuan" style="color: #5A5A58;">全选</a>
					<a href="javascript:hd_reverse_select('.ca_gou')" class="ca_fanxuan" style="color: #5A5A58;">反选</a>
    			</li>
    			<li class="li2">店铺宝贝</li>
    			<li class="li3">单价</li>
    			<li class="li4">数量</li>
    			<li class="li5">小计(元)</li>
    			<li class="li6">操作</li>
    		</ul>
    		<form action="" method="post">
    		<?php foreach ($shop as $k=>$v){?>
    			
	    		<div class="wupin">
	    			<div class="ca_gou">
		    				<input type="checkbox" name="checkBox[]" value="<?php echo $k;?>" class="checkBox"/>
		    		</div>
	    			
	    			<img src="http://127.0.0.1/my/wasai/<?php echo $v['img']['medium'];?>"/>
	    			<ul class="ul_one">
	    				<li><a href=""><?php echo $v['name'];?></a></li>
	    				<li>
	    					<?php foreach ($v['attrSpec'] as $kk=>$vv){?>
	    						<span><?php echo $kk;?>:<?php echo $vv[0];?></span>&nbsp;
	    					<?php }?>
	    				</li>
	    			</ul>
	    			<div class="two">
	    				<ul class="ul_two">
	    				  <li class="li3"><span>￥<?php echo $v['price'];?>.00</span></li>
	    				  <li class="li1"><span><?php echo $v['num'];?></span></li>
	    				  <li class="li2"><span>￥<?php echo $v['total'];?>.00</span></li>
	    			    </ul>
	    			</div>
	    			<ul class="ul_three">
	    				<li class="li1"><a href="" class="delshop" sid="<?php echo $k;?>">删除此商品</a></li>
	    			</ul>
	    		</div>
	    		
    		<?php }?>
    		</form>
    		<ul class="shop_one two">
    			<li class="li1">
    				<a href="javascript:hd_select_all('.ca_gou')" class="ca_quanxuan">全选</a>
					<a href="javascript:hd_reverse_select('.ca_gou')" class="ca_fanxuan">反选</a>
    			</li>
    			<li class="li2"><a href="" class="bigdel">批量删除 </a></li>
    			<li class="li3"></li>
    			<li class="li4 one">宝贝总价<span>￥<?php echo $zong['total'];?>.00</span></li>
    			<li class="li5"></li>
    			<li class="li6 one"><a href="javascript:;" class="chauid"></a></li>
    		</ul>
    	</div>
    </div>
    
    <!--购物车结束-->
    
  
    <!--底部-->
    <div class="foot">
    	<div class="gaoduan">
    		<span>高端定制上哇噻网</span>
    	</div>
    	<div class="di">
    		<ul>
    			<li><a href="">关于我们</a></li>
    			<li><a href="">联系我们</a></li>
    			<li><a href="">媒体报道</a></li>
    			<li><a href="">创意画报</a></li>
    			<li><a href="">招贤纳士</a></li>
    			<li><a href="">版权保护</a></li>
    			<li><a href="">用户条款</a></li>
    			<li><a href="">隐私声明</a></li>
    			<li><a href="">友情链接</a></li>
    			<li><a href="">网站地图</a></li>
    			<li><a href="">帮助中心</a></li>
    			<li><a href="">手工客</a></li>
    		</ul>
    		<ul class="u1">
    			<li>北京光年创艺信息技术有限公司 WowSai.com Copyright© 2008-2013 [京ICP备10020900][京公网安备11010502026420][京ICP证090011号]</li>
    		</ul>
    		<div class="tu">
    		   <ul>
    		   	    <li><img src="http://127.0.0.1/my/wasai/Static/public/images/2.png" alt="" /></li>
    		   	    <li><img src="http://127.0.0.1/my/wasai/Static/public/images/1.png" alt="" /></li>
    		   	    <li><img src="http://127.0.0.1/my/wasai/Static/public/images/3.png" alt="" /></li>
    		   </ul>
    	    </div>
    	</div>
    	
    </div>
    
    <div class="ding">
    	<a href="javascript:;"></a>
    </div>
    
</body>
</html>

